/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ContactQueryCriteria } from '../models/ContactQueryCriteria';
import type { RContactVo } from '../models/RContactVo';
import type { RPageContactVo } from '../models/RPageContactVo';

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class ContactService {

    /**
     * 公开的 用于用户的会话列表
     * @param requestBody
     * @returns RPageContactVo OK
     * @throws ApiError
     */
    public static getContactPage(
        requestBody: ContactQueryCriteria,
    ): CancelablePromise<RPageContactVo> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/contact/public/contact/page',
            body: requestBody,
            mediaType: 'application/json',
        });
    }

    /**
     * 会话详情
     * @param roomId
     * @returns RContactVo OK
     * @throws ApiError
     */
    public static getContactDetail(
        roomId: number,
    ): CancelablePromise<RContactVo> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/api/1.0/contact/public/contact/detail',
            query: {
                'roomId': roomId,
            },
        });
    }

    /**
     * 会话详情
     * @param friendId
     * @returns RContactVo OK
     * @throws ApiError
     */
    public static getContactDetailByFriend(
        friendId: number,
    ): CancelablePromise<RContactVo> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/api/1.0/contact/public/contact/detail/friend',
            query: {
                'friendId': friendId,
            },
        });
    }

}
